package com.cashmama.market.api.application.controller.order.repay.request;

import com.cashmama.market.api.infras.exception.ApplicationException;
import com.cashmama.market.api.infras.utils.StringUtils;
import com.fqgj.common.api.ParamsObject;

/**
 * @program: market-api
 * @description
 * @author: frank
 * @create: 2019-12-26 10:24
 **/
public class RepayRequest extends ParamsObject {

    /**
     *
     */
    private String tradeNo;

    public String getTradeNo() {
        return tradeNo;
    }

    public RepayRequest setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
        return this;
    }

    @Override
    public void validate() {
        if(StringUtils.isEmpty(tradeNo)){
            throw new ApplicationException("tradeNo cannot be empty");
        }
    }
}
